Skip to content

feat(desktop): group the sidebar by Run / Set up / Advanced behind one project switcher - #97

Merged
pyramation merged 1 commit into
mainfrom
feat/sidebar-run-setup-advanced
Aug 9, 2026
Merged

feat(desktop): group the sidebar by Run / Set up / Advanced behind one project switcher#97
pyramation merged 1 commit into
mainfrom
feat/sidebar-run-setup-advanced

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Nine flat nav items made "Show" and "Users & Secrets" look equally likely to be the thing you want. The sidebar is now grouped by when you reach for something, with the current project chosen once at the top:

┌ grace-cathedral            ▾ ┐   ← ProjectSwitcher, sidebar header
├── Run          Show · Status
├── Set up · grace-cathedral
│                Layout · Lights · Output
└── Advanced     Devices · People & Keys · Settings

ConfigLayout, Users & SecretsPeople & Keys. Projects stops being a nav destination: the switcher owns choosing one and links to "Manage projects…", which is closer to how it actually works — you don't visit projects, you're in one.

The substantive change under the cosmetics is that there is now exactly one current project. configProject (the project a row's "Config" button pinned for editing) is gone, so editingProject === activeProject always. Previously the screen and the stage could disagree about which project you were changing, which is the same class of bug as the stale Lights panel and the dead session.

That makes switching a real action, so every path to it funnels through one guard rather than each button deciding for itself:

requestProjectSwitch(name) =
  name === activeProject ? noop
  : status.running       ? setPendingProject(name)   // <SwitchProjectDialog/>: restarting darkens the lasers
  :                        onUse(name)

Both the switcher and the Projects screen (onUse, and onEditConfig, which now switches then opens Layout) go through it.

The nav model moved out of App.tsx into renderer/lib/navigation.ts so it can be asserted on: navigation.test.ts fails if a route is added that appears in no group and isn't explicitly listed as switcher-reachable — the flat list had no such guard, and a route that exists but is unreachable looks exactly like a broken build.

AppShell gains one additive prop, sidebarHeader, rendered under the brand; no existing usage changes.

pnpm test, pnpm build, pnpm lint pass.

Link to Devin session: https://app.devin.ai/sessions/972698f89f494b86828010666a002b8f
Requested by: @pyramation

@pyramation pyramation self-assigned this Aug 9, 2026
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@pyramation
pyramation merged commit 6e8817f into main Aug 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant